package com.du.cloud.service.admin.api.feign.fallback;

import com.du.cloud.common.base.utils.Result;
import com.du.cloud.service.admin.api.feign.RemoteUserService;
import com.du.cloud.service.admin.api.model.dto.UserInfo;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * Desc:
 * Author: dushuang
 * Date: 2020/5/25
 **/
@Slf4j
@Component
public class RemoteUserServiceFallbackImpl implements RemoteUserService {

    @Setter
    private Throwable cause;

    @Override
    public Result<UserInfo> info(String username, String from) {
        log.error("feign 查询用户信息失败:{}", username, cause);
        return null;
    }
}
